<body>
<script src="full-screen-test.js"></script>
<span></span>
<script>
    var span = document.getElementsByTagName("span")[0];

    var spanEnteredFullScreen = function() {
        testExpected("document.webkitCurrentFullScreenElement", span);
        waitForEventOnceAndEnd(document, "webkitfullscreenchange");
        runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
    };

    waitForEventOnce(document, "webkitfullscreenchange", spanEnteredFullScreen);
    runWithKeyDown(function(){span.webkitRequestFullScreen()});
</script>
